/**
 * 
 */
package com.effectiv.gooruda.security.rest;

import java.util.Collection;

import lombok.Getter;
import lombok.Setter;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import com.effectiv.gooruda.domain.Application;

/**
 * @author Dhrubo
 *
 */
public class RESTUser extends User{

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Getter @Setter
	private String publicKey;
	
	@Getter @Setter
	private String privateKey;
	
	@Getter @Setter
	private String appName;
	
	
	
	@Getter @Setter
	private Application application;

    public RESTUser(String username, String password, String apiKey, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.publicKey = apiKey;
    }

    public RESTUser(String username, String password, String apiKey, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.publicKey = apiKey;
    }

    
}
